package org.hgvc.webapp.ets.spring.service;

import java.util.Date;
import java.util.List;

import org.hgvc.webapp.ets.bo.Agent;
import org.hgvc.webapp.ets.bo.AgentCommission;
import org.hgvc.webapp.ets.bo.Agreement;
import org.hgvc.webapp.ets.bo.AgreementControl;
import org.hgvc.webapp.ets.bo.CommissionPaymentSchema;
import org.hgvc.webapp.ets.bo.CommissionSchema;
import org.hgvc.webapp.ets.bo.CommissionSchemaMembership;
import org.hgvc.webapp.ets.bo.CommissionSchemaPaymentRange;
import org.hgvc.webapp.ets.bo.Membership;
import org.jocsb.base.bo.User;
import org.jocsb.base.exception.BaseException;


public interface AgentService {
	public String agentRegistration(Agent agent,boolean isOnlienReg,User creadtedUser)throws BaseException;
	public Agent getAgentByUserId(String userId)throws BaseException;
	public List<CommissionPaymentSchema> getCommissionPaymentSchemaListType(String type)throws BaseException;
	public void createCommissionPaymentSchemaType(CommissionPaymentSchema schema,User user)throws BaseException;
	public void editCommissionPaymentSchemaType(CommissionPaymentSchema schema,User user)throws BaseException;
	public void deleteCommissionPaymentSchema(List<CommissionPaymentSchema> deleteList,User user)throws BaseException;
	public List<CommissionSchema> getCommissionSchemaListType(String type)throws BaseException;
	public List<CommissionSchemaPaymentRange> getCommissionSchemaPaymentRangeBySchId(String id)throws BaseException;
	public void createCommissionSchemaType(CommissionSchema schema,User user,List<CommissionSchemaPaymentRange> rlist,List<CommissionSchemaMembership> mlist)throws BaseException;
	public void editCommissionSchemaType(CommissionSchema schema,User user,List<CommissionSchemaPaymentRange> rlist,List<CommissionSchemaMembership> mlist)throws BaseException;
	public void deleteCommissionSchemaType(List<CommissionSchema> deleteList,User user)throws BaseException;
	public List<Membership> getMembershipList()throws BaseException;
	public Agent getAgentById(String id)throws BaseException;
	public void approveAgentRegistration(Agent agent,AgreementControl control, User approver,String reason,String code,String actionNo)throws BaseException;
	public void rejectAgentRegistration(Agent agent, User approver,String reason,String actionNo)throws BaseException;
	public List<CommissionPaymentSchema> getCommissionPaymentSchemaListAgentId(String agentId)throws BaseException;
	public void createCommissionPaymentSchemaAgent(CommissionPaymentSchema schema,User user,Agent agent)throws BaseException;
	public void editCommissionPaymentSchemaAgent(CommissionPaymentSchema schema,User user,Agent agent)throws BaseException;
	public void editCommissionSchemaAgent(CommissionSchema schema,User user,List<CommissionSchemaPaymentRange> rlist,List<CommissionSchemaMembership> mlist,Agent agent)throws BaseException;
	public void createCommissionSchemaAgent(CommissionSchema schema,User user,List<CommissionSchemaPaymentRange> rlist,List<CommissionSchemaMembership> mlist,Agent agent)throws BaseException;
	public List<CommissionSchema> getCommissionSchemaListAgentId(String agentId)throws BaseException;
	public List<Agent> getSubAgent(Agent agent)throws BaseException;
	public void createSubAgent(Agent subAgent,Agent agent,User createUser)throws BaseException;
	public void editSubAgent(Agent subAgent,Agent agent,User createUser)throws BaseException;
	public void deleteSubAgent(List<Agent> agentList,User createUser)throws BaseException;
	public List<Agent> getAgentListByType(String type)throws BaseException;
	public List<Agent> searchRegNoPartnerNameInList(String regno,String name,List<Agent> agentList)throws BaseException;
	public List<AgreementControl> getAgreementControlList(Agent agent)throws BaseException;
	public void deleteAgreementControl(List<AgreementControl> controllist,User user)throws BaseException;
	public void editAgreementControl(AgreementControl control,User user)throws BaseException;
	public void createAgreementControl(AgreementControl control,User createUser)throws BaseException;
	public List<CommissionSchemaMembership> getCommissionSchemaMembershipBySchId(String id)throws BaseException;
	public void calculateAgreementCommission(Agreement agreement,Agent agent)throws Exception;
	public List<AgentCommission> getAgentCommissionListByDateRange(String agentId,Date from,Date to)throws BaseException;
	public void updateAgentProfileAction(Agent agent,User user)throws BaseException;
	void saveTerminateAgent(String agentId, User user) throws Exception;
}
